import { createRouter, createWebHistory } from 'vue-router'


const routes = [
    {
        path: '/manage',
        name: 'manage',
        component: () => import('../components/manage/manageIndex.vue'),
        children: [
            {
            path: '/map',
            name: 'map',
            component: () => import('../components/manage/mapIndex.vue')
            },
            {
                path: '/dev',
                name: 'dev',
                component: () => import('../components/manage/devIndex.vue')
            },
            {
                path: '/monitor',
                name: 'monitor',
                component: () => import('../components/manage/monitorIndex.vue')
            },
            {
                path: '/control',
                name: 'control',
                component: () => import('../components/manage/controlIndex.vue')
            },
            {
                path: '/welcome',
                name: 'welcome',
                component: () => import('../components/manage/welcomeIndex.vue')
            },
            {
                path: '/add',
                name: 'add',
                component: () => import('../components/manage/addIndex.vue')
            },
            {
                path: '/message',
                name: 'message',
                component: () => import('../components/manage/messageIndex.vue')
            },
           

        ]
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../components/login/loginIndex.vue')
    },
    {
        path: '/register',
        name: 'register',
        component: () => import('../components/login/registerIndex.vue')
    },

]

const router = createRouter({

    history: createWebHistory(),
    routes,
})

export default router;

